<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>testframe</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <style>
    body button {
        padding: 15px;
        margin-top: 10px;
        color: #00ff00;
       
    }
    body {
         -webkit-user-select: all 
    }
    </style>
</head>

<body>
    <br>
    <br>
    <br>
    <br>
    <div>测试长按复制功能</div>
    <br>
    <div onclick='openfrm()'> 1-打开frame,不带动画，reload:false </div>
    <br>
    <div onclick='openfrm1()'>2-打开frame,不带动画，reload:true </div>
    <br>
    <div onclick='openfrm2()'> 3-打开frame,带动画，reload:true </div>
    <br>
    <div onclick='openfrm3()'> 4-打开frame,带动画，reload:false </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
apiready = function() {


};

//不带动画，reload:false
function openfrm() {
    api.openFrame({
        name: 'testframe1',
        url: 'testframe.html',
        rect: {
            x: 0,
            y: 300,
            w: 'auto',
            h: 'auto'
        },
        reload: false
    });
}
//不带动画，reload:true
function openfrm1() {
    api.openFrame({
        name: 'testframe2',
        url: 'testframe.html',
        rect: {
            x: 0,
            y: 300,
            w: 'auto',
            h: 'auto'
        },
        reload: true
    });
}


//带动画，reload:true
function openfrm2() {
    api.openFrame({
        name: 'testframe3',
        url: 'testframe.html',
        rect: {
            x: 0,
            y: 300,
            w: 'auto',
            h: 'auto'
        },
        reload: true,
        animation: {
            type: 'movein',
            subType: 'from_right',
            duration: 400
        },
    });
}

//带动画，reload:false
function openfrm3() {
    api.openFrame({
        name: 'testframe4',
        url: 'testframe.html',
        rect: {
            x: 0,
            y: 300,
            w: 'auto',
            h: 'auto'
        },
        reload: false,
        animation: {
            type: 'movein',
            subType: 'from_right',
            duration: 400
        },
    });
}
</script>

</html>
